package String.exercise;

public class Demo2 {
    public static void main(String[] args) {
        Student s=new Student("李四",23);
        System.out.println(s);
        String name = s.getName();
        int age = s.getAge();
        System.out.println(name+age);
    }
}
 class Student{
        private int age ;
        private String name;
        public  Student(){
        }
        public Student(String name,int age){
            this.name=name;
            this.age=age;
        }
        public void setName(String name){
            this.name=name;
        }
        public String getName(){
            return name;
        }
        public void setAge(int age){
            this.age=age;
        }
        public int getAge(){
            return age;
        }

}